package eteam.aps.client;

import eteam.aps.common.R;
import eteam.aps.common.exceptions.AuthException;
import eteam.aps.systeminterface.model.vo.QueryInfoVo;
import eteam.aps.systeminterface.model.vo.Worksheets;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * 单据流水号远程调用
 *
 * @author LiuLei
 */
@FeignClient("essential-data-service")
public interface CommonClient {

    @PostMapping("/work/selectSheetPrefix/{sheetCode}")
    Worksheets selectSheetPrefix(@PathVariable String sheetCode) throws Exception, AuthException;

    @PostMapping("/work/selectNameByCode/{code}")
    QueryInfoVo selectNameByCode(@PathVariable String code) throws Exception, AuthException;

    @PostMapping("/ed/selectUsername")
    Map<String, String> selectUserName() throws Exception, AuthException;

    @PostMapping("/ed/selectDdInfo")
    R<List<QueryInfoVo>> selectDdInfo(@RequestParam("ddcName") String ddcName) throws Exception, AuthException;
}
